<?php
include_once 'include.php';
$total = sql_count('lyy_shiyan','del=1');#总行数
$curr = isset($_REQUEST['curr'])?$_REQUEST['curr']:1;#当前页
$limit = 10;#每页多少行
$page = ceil($total/$limit);#总共有多少页
$offset = ($curr-1)*$limit;
$lists = page('lyy_shiyan','title,file_url',$curr,$limit,'del=1');#实验列表
?>
<!DOCTYPE html>
<html>
<head>
    <?php include_once 'common_js_css.php'?>
	<link rel="stylesheet" type="text/css" href="css/shiyan.css">
</head>
<body>
    <div class="cont" style="height: 910px">
        <div class="shiyan">
            <span><h1>课程实验</h1></span>
        </div>
        <div >
            <table width="875" class="tb" style="border-collapse:separate; border-spacing:0px 0px;">
                <?php foreach ($lists as $list): ?>
                    <tr>
                        <td height="50"><a href="<?php echo $list['file_url']; ?>"><?php echo $list['title']; ?></a></td>
                    </tr>
                <?php endforeach; ?>
                <!--显示分页，只有一页，即不显示分页-->
                <?php if($total>$limit){echo showPage($curr,$page);}?>
            </table>
        </div>
    </div>
</body>
</html>